package cn.declare.service.impl;

import cn.declare.bean.Appealreporting;
import cn.declare.bean.Appealtype;
import cn.declare.bean.Complete;
import cn.declare.dao.Appealreportingdao;
import cn.declare.dto.AppealreportingDto;
import cn.declare.service.AppealreportingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * Author
 * 潘红阳
 */
@Service
public class AppealreportingServiceImpl implements AppealreportingService {

    @Autowired
    private Appealreportingdao appealreportingdao;

    @Override
    public List<AppealreportingDto> selectappealAllbyStatus(int completestatus,int rejectid, int userid, int tradeId, int currpage, int pagesize) {
        return appealreportingdao.selectappealAllbyStatus(completestatus,rejectid,userid,tradeId,(currpage-1)*pagesize,pagesize);
    }

    @Override
    public AppealreportingDto selectappealByid(int appealreportingid) {
        return appealreportingdao.selectappealByid(appealreportingid);
    }

    @Override
    public AppealreportingDto selectapplebysavestatus(int userid) {
        return appealreportingdao.selectapplebysavestatus(userid);
    }

    @Override
    public int applebysavestatusUpdate(Appealreporting appealreporting) {
        return appealreportingdao.applebysavestatusUpdate(appealreporting);
    }

    @Override
    public List<Appealtype> selectAllappealtype() {
        return appealreportingdao.selectAllappealtype();
    }

    @Override
    public int pagecount(int completestatus, int userid, int tradeId) {
        return appealreportingdao.pagecount(completestatus,userid,tradeId);
    }

    @Override
    public int appealAdd(Appealreporting appealreporting) {
        return appealreportingdao.appealAdd(appealreporting);
    }

    @Override
    public int appealrejectid(int rejectid, String rejectcontent, int appealreportingid) {
        return appealreportingdao.appealrejectid(rejectid,rejectcontent,appealreportingid);
    }

    @Override
    public int appealUpdate(Appealreporting appealreporting) {
        return appealreportingdao.appealUpdate(appealreporting);
    }

    @Override
    public int appealUpdatebyid(int completestatus, int appealreportingid) {
        return appealreportingdao.appealUpdatebyid(completestatus,appealreportingid);
    }

    @Override
    public int completeAdd(Complete complete) {
        return appealreportingdao.completeAdd(complete);
    }

    @Override
    public List<Complete> selectCompleteAllbyid(int appealreportingid) {
        return appealreportingdao.selectCompleteAllbyid(appealreportingid);
    }
}
